/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package praticav.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;

@Entity
@Table(name="fases")

/*
@SequenceGenerator(name = "seq_fase",  
                   sequenceName = "seq_fase",  
                   allocationSize = 1)
 * 
 */

/**
 * @author Katiane
 */
public class Fases implements Serializable {

    /*
    @GeneratedValue(strategy = GenerationType.SEQUENCE,  
             generator = "seq_fase") 
    
    @Id private int fascodigo;
    
    @ManyToOne // uma produção pode ter várias fases
    @JoinColumn(name  = "procodigo")
    private Producao producao;
     */
    @Id 
    private FasesPK chave;
    
    
    private String fasdescricao;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date fasdtainicial;
    @Temporal(javax.persistence.TemporalType.DATE) 
    private Date fasdtafinal;
    

    private int faspredecessor;
    
    private int fassequencial;

    public FasesPK getChave() {
        return chave;
    }

    public void setChave(FasesPK chave) {
        this.chave = chave;
    }

    
    public String getFasdescricao() {
        return fasdescricao;
    }

    public void setFasdescricao(String fasdescricao) {
        this.fasdescricao = fasdescricao;
    }

    public Date getFasdtafinal() {
        return fasdtafinal;
    }

    public void setFasdtafinal(Date fasdtafinal) {
        this.fasdtafinal = fasdtafinal;
    }

    public Date getFasdtainicial() {
        return fasdtainicial;
    }

    public void setFasdtainicial(Date fasdtainicial) {
        this.fasdtainicial = fasdtainicial;
    }

    public int getFaspredecessor() {
        return faspredecessor;
    }

    public void setFaspredecessor(int faspredecessor) {
        this.faspredecessor = faspredecessor;
    }

    public int getFassequencial() {
        return fassequencial;
    }

    public void setFassequencial(int fassequencial) {
        this.fassequencial = fassequencial;
    }
    
    public String toString(){ // Texto que vai aparecer na combobox
        return this.fasdescricao;
    }
}